from langchain.prompts import PromptTemplate
from langchain.llms import OpenAI
import os

os.environ["OPENAI_API_KEY"] = "sess-qCX1fF30AgyeRtGPXivJSiOjDBoTno5CksuRwhst"
llm = OpenAI(temperature=0.9)
prompt = PromptTemplate(
    input_variables=["product"],
    template="What is a good name for a accompany that makes {product}?",
)

from langchain.chains import LLMChain

#创建一个chain，接受用户输入，格式化提示符，将它发送到LLM
chain = LLMChain(llm=llm, prompt=prompt)
result = chain.run("colorful socks")
print(result)
